package com.suarte.webapp.action;

import org.appfuse.service.GenericManager;

import java.util.List;
import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 * User: Gcastillo
 * Date: Jan 13, 2011
 * Time: 10:03:10 PM
 * To change this template use File | Settings | File Templates.
 */
public class WorkTypeList extends BasePage implements Serializable {
    private GenericManager workTypeManager;

    public void setWorkTypeManager(GenericManager workTypeManager) {
        this.workTypeManager = workTypeManager;
    }

    public WorkTypeList() {
        setSortColumn("id"); // sets the default sort column
    }

    public List getWorkTypes() {
        return sort(workTypeManager.getAll());
    }
}